home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nct03050.geo / 00167.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  4.3 KB  |  193 lines

  1. on startMovie
  2.   Set_CDcounter(5)
  3.   initLesson()
  4.   CheckForTagWd()
  5.   unLoadCast()
  6. end
  7.  
  8. on HideLastStep
  9.   unLoadCast()
  10.   RestoreHilites()
  11. end
  12.  
  13. on TheinitCursor
  14.   initCursorCastNum()
  15.   initCursorList(1)
  16.   set CursorCastNum to getCursor(2)
  17.   cursor([CursorCastNum, CursorCastNum + 1])
  18. end
  19.  
  20. on checkScreenStatus
  21.   CheckRollOver()
  22.   CheckSnakeStatus()
  23.   go(the frame)
  24. end
  25.  
  26. on BlinkNext
  27.   if (the timer > getTimer()) and not soundBusy(2) then
  28.     startTimer()
  29.     if the name of cast the castNum of sprite get_NEXTSprite() = "NEXT" then
  30.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT_E"
  31.     else
  32.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT"
  33.     end if
  34.   end if
  35. end
  36.  
  37. on GoNext
  38.   if not get_Disabled() then
  39.     sound stop 2
  40.     if Get_NEXT() = 3 then
  41.       unLoadCast(34, 116)
  42.     end if
  43.     if Get_NEXT() > 3 then
  44.       GoNextMovie()
  45.     else
  46.       go("t" & Get_NEXT())
  47.     end if
  48.     Set_NEXT(Get_NEXT() + 1)
  49.   end if
  50. end
  51.  
  52. on stopMovie
  53.   sound stop 1
  54.   unLoad()
  55.   setEmptyCursor()
  56. end
  57.  
  58. on GoNextMovie
  59.   PlaySound("GOSOUND.SO1")
  60.   SaveHilite()
  61.   Add_CDcounter(1)
  62.   set cdNum to Get_CDcounter()
  63.   set movieName to item cdNum of Get_CurrentSnakeScreens()
  64.   go("INIT" & Get_ScreenSubject(), movieName & ".GEO")
  65. end
  66.  
  67. on playTheTSound theTSnd
  68.   PlaySound("NCT03050.S0" & theTSnd)
  69. end
  70.  
  71. on InitLamp
  72.   set the visible of sprite 33 to 0
  73.   set the visible of sprite 34 to 0
  74.   UpdateCursors(34, 0)
  75.   UpdateCursors(32, 3)
  76. end
  77.  
  78. on unSetMouseEvents
  79.   global puppetList
  80.   set puppetList to []
  81.   repeat with i = 1 to 48
  82.     add(puppetList, the puppet of sprite i)
  83.     if not (the puppet of sprite i) then
  84.       set the puppet of sprite i to 1
  85.     end if
  86.   end repeat
  87.   play frame "outLamp"
  88. end
  89.  
  90. on setMouseEvents
  91.   global puppetList
  92.   set the mouseDownScript to EMPTY
  93.   set the mouseUpScript to EMPTY
  94.   set the keyDownScript to EMPTY
  95.   set the keyUpScript to EMPTY
  96.   repeat with i = 1 to 48
  97.     if getAt(puppetList, i) = 0 then
  98.       set the puppet of sprite i to 0
  99.     end if
  100.   end repeat
  101.   play done
  102. end
  103.  
  104. on dont
  105.   dontPassEvent()
  106. end
  107.  
  108. on HandleLamp
  109.   sound stop 1
  110.   sound stop 2
  111.   if the name of cast the castNum of sprite 32 = "lamp_On" then
  112.     set the castNum of sprite 32 to the number of cast "lamp_Off"
  113.     set the visible of sprite 33 to 0
  114.     set the visible of sprite 34 to 0
  115.     UpdateCursors(34, 0)
  116.     set the castNum of sprite 34 to the number of cast "EXITLAMP"
  117.     updateStage()
  118.     unSetMouseEvents()
  119.   else
  120.     set the castNum of sprite 32 to the number of cast "lamp_On"
  121.     UpdateCursors(34, 3)
  122.     set the visible of sprite 33 to 1
  123.     set the visible of sprite 34 to 1
  124.     updateStage()
  125.     PlaySound("NCT03050.T01")
  126.     displayTip(34)
  127.   end if
  128.   updateStage()
  129. end
  130.  
  131. on displayTip theExitBtnSp
  132.   global exitTheLoop
  133.   set exitTheLoop to 0
  134.   set the mouseDownScript to "dont"
  135.   set the mouseUpScript to "dont"
  136.   set the keyDownScript to "dont"
  137.   set the keyUpScript to "dont"
  138.   set the exitLock to 0
  139.   repeat while not exitTheLoop
  140.     if the mouseCast = the number of cast "EXITLAMP" then
  141.       set the cursor of sprite 48 to [404, 405]
  142.     else
  143.       set the cursor of sprite 48 to [400, 401]
  144.     end if
  145.     if the mouseDown and (the mouseCast = the number of cast "EXITLAMP") then
  146.       switchExitLampButt(theExitBtnSp, "EXITLAMP_D")
  147.     end if
  148.   end repeat
  149.   set the exitLock to 1
  150.   set the cursor of sprite 48 to 0
  151.   HandleLamp()
  152. end
  153.  
  154. on switchExitLampButt spriteNum, castDown
  155.   global exitTheLoop
  156.   set flag to 0
  157.   set SaveCast to the castNum of sprite spriteNum
  158.   set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  159.   repeat while the mouseDown
  160.     set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  161.   end repeat
  162.   if flag = 1 then
  163.     set exitTheLoop to 1
  164.   end if
  165. end
  166.  
  167. on swapExitLampCast spriteNum, SaveCast, castDown
  168.   if rollOver(spriteNum) then
  169.     set the castNum of sprite spriteNum to the number of cast castDown
  170.     updateStage()
  171.     return 1
  172.   else
  173.     set the castNum of sprite spriteNum to the number of cast SaveCast
  174.     updateStage()
  175.     return 0
  176.   end if
  177. end
  178.  
  179. on blinkHiLight
  180.   global Localtimer
  181.   if (the timer > getTimer()) and not soundBusy(2) and (Localtimer < 2) then
  182.     startTimer()
  183.     if the visible of sprite 20 then
  184.       set the visible of sprite 20 to 0
  185.     else
  186.       puppetSound("highlight1")
  187.       set the visible of sprite 20 to 1
  188.       updateStage()
  189.       set Localtimer to Localtimer + 1
  190.     end if
  191.   end if
  192. end
  193.